Integrand size = 23, antiderivative size = 57 \[ \int \frac {\text {csch}^2(c+d x)}{a+b \sinh ^2(c+d x)} \, dx=-\frac {b \text {arctanh}\left (\frac {\sqrt {a-b} \tanh (c+d x)}{\sqrt {a}}\right )}{a^{3/2} \sqrt {a-b} d}-\frac {\coth (c+d x)}{a d} \]
Time = 0.74 (sec) , antiderivative size = 57, normalized size of antiderivative = 1.00 \[ \int \frac {\text {csch}^2(c+d x)}{a+b \sinh ^2(c+d x)} \, dx=\frac {-\frac {b \text {arctanh}\left (\frac {\sqrt {a-b} \tanh (c+d x)}{\sqrt {a}}\right )}{\sqrt {a-b}}-\sqrt {a} \coth (c+d x)}{a^{3/2} d} \]
(-((b*ArcTanh[(Sqrt[a - b]*Tanh[c + d*x])/Sqrt[a]])/Sqrt[a - b]) - Sqrt[a] *Coth[c + d*x])/(a^(3/2)*d)
Time = 0.26 (sec) , antiderivative size = 55, normalized size of antiderivative = 0.96, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.217, Rules used = {3042, 25, 3666, 359, 221}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {\text {csch}^2(c+d x)}{a+b \sinh ^2(c+d x)} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int -\frac {1}{\sin (i c+i d x)^2 \left (a-b \sin (i c+i d x)^2\right )}dx\) |
\(\Big \downarrow \) 25 |
\(\displaystyle -\int \frac {1}{\sin (i c+i d x)^2 \left (a-b \sin (i c+i d x)^2\right )}dx\) |
\(\Big \downarrow \) 3666 |
\(\displaystyle \frac {\int \frac {\coth ^2(c+d x) \left (1-\tanh ^2(c+d x)\right )}{a-(a-b) \tanh ^2(c+d x)}d\tanh (c+d x)}{d}\) |
\(\Big \downarrow \) 359 |
\(\displaystyle \frac {-\frac {b \int \frac {1}{a-(a-b) \tanh ^2(c+d x)}d\tanh (c+d x)}{a}-\frac {\coth (c+d x)}{a}}{d}\) |
\(\Big \downarrow \) 221 |
\(\displaystyle \frac {-\frac {b \text {arctanh}\left (\frac {\sqrt {a-b} \tanh (c+d x)}{\sqrt {a}}\right )}{a^{3/2} \sqrt {a-b}}-\frac {\coth (c+d x)}{a}}{d}\) |
(-((b*ArcTanh[(Sqrt[a - b]*Tanh[c + d*x])/Sqrt[a]])/(a^(3/2)*Sqrt[a - b])) - Coth[c + d*x]/a)/d
3.1.37.3.1 Defintions of rubi rules used
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-a/b, 2]/a)*ArcTanh[x /Rt[-a/b, 2]], x] /; FreeQ[{a, b}, x] && NegQ[a/b]
Int[((e_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^2)^(p_.)*((c_) + (d_.)*(x_)^2), x _Symbol] :> Simp[c*(e*x)^(m + 1)*((a + b*x^2)^(p + 1)/(a*e*(m + 1))), x] + Simp[(a*d*(m + 1) - b*c*(m + 2*p + 3))/(a*e^2*(m + 1)) Int[(e*x)^(m + 2)* (a + b*x^2)^p, x], x] /; FreeQ[{a, b, c, d, e, p}, x] && NeQ[b*c - a*d, 0] && LtQ[m, -1] && !ILtQ[p, -1]
Int[sin[(e_.) + (f_.)*(x_)]^(m_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]^2)^( p_.), x_Symbol] :> With[{ff = FreeFactors[Tan[e + f*x], x]}, Simp[ff^(m + 1 )/f Subst[Int[x^m*((a + (a + b)*ff^2*x^2)^p/(1 + ff^2*x^2)^(m/2 + p + 1)) , x], x, Tan[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f}, x] && IntegerQ[m/2] & & IntegerQ[p]
Leaf count of result is larger than twice the leaf count of optimal. \(182\) vs. \(2(49)=98\).
Time = 0.19 (sec) , antiderivative size = 183, normalized size of antiderivative = 3.21
method | result | size |
risch | \(-\frac {2}{a d \left ({\mathrm e}^{2 d x +2 c}-1\right )}+\frac {b \ln \left ({\mathrm e}^{2 d x +2 c}+\frac {2 a \sqrt {a^{2}-a b}-b \sqrt {a^{2}-a b}+2 a^{2}-2 a b}{b \sqrt {a^{2}-a b}}\right )}{2 \sqrt {a^{2}-a b}\, d a}-\frac {b \ln \left ({\mathrm e}^{2 d x +2 c}+\frac {2 a \sqrt {a^{2}-a b}-b \sqrt {a^{2}-a b}-2 a^{2}+2 a b}{b \sqrt {a^{2}-a b}}\right )}{2 \sqrt {a^{2}-a b}\, d a}\) | \(183\) |
derivativedivides | \(\frac {-\frac {\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )}{2 a}-\frac {1}{2 a \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )}+2 b \left (\frac {\left (\sqrt {-b \left (a -b \right )}+b \right ) \arctan \left (\frac {a \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )}{\sqrt {\left (2 \sqrt {-b \left (a -b \right )}-a +2 b \right ) a}}\right )}{2 a \sqrt {-b \left (a -b \right )}\, \sqrt {\left (2 \sqrt {-b \left (a -b \right )}-a +2 b \right ) a}}-\frac {\left (\sqrt {-b \left (a -b \right )}-b \right ) \operatorname {arctanh}\left (\frac {a \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )}{\sqrt {\left (2 \sqrt {-b \left (a -b \right )}+a -2 b \right ) a}}\right )}{2 a \sqrt {-b \left (a -b \right )}\, \sqrt {\left (2 \sqrt {-b \left (a -b \right )}+a -2 b \right ) a}}\right )}{d}\) | \(208\) |
default | \(\frac {-\frac {\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )}{2 a}-\frac {1}{2 a \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )}+2 b \left (\frac {\left (\sqrt {-b \left (a -b \right )}+b \right ) \arctan \left (\frac {a \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )}{\sqrt {\left (2 \sqrt {-b \left (a -b \right )}-a +2 b \right ) a}}\right )}{2 a \sqrt {-b \left (a -b \right )}\, \sqrt {\left (2 \sqrt {-b \left (a -b \right )}-a +2 b \right ) a}}-\frac {\left (\sqrt {-b \left (a -b \right )}-b \right ) \operatorname {arctanh}\left (\frac {a \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )}{\sqrt {\left (2 \sqrt {-b \left (a -b \right )}+a -2 b \right ) a}}\right )}{2 a \sqrt {-b \left (a -b \right )}\, \sqrt {\left (2 \sqrt {-b \left (a -b \right )}+a -2 b \right ) a}}\right )}{d}\) | \(208\) |
-2/a/d/(exp(2*d*x+2*c)-1)+1/2/(a^2-a*b)^(1/2)*b/d/a*ln(exp(2*d*x+2*c)+(2*a *(a^2-a*b)^(1/2)-b*(a^2-a*b)^(1/2)+2*a^2-2*a*b)/b/(a^2-a*b)^(1/2))-1/2/(a^ 2-a*b)^(1/2)*b/d/a*ln(exp(2*d*x+2*c)+(2*a*(a^2-a*b)^(1/2)-b*(a^2-a*b)^(1/2 )-2*a^2+2*a*b)/b/(a^2-a*b)^(1/2))
Leaf count of result is larger than twice the leaf count of optimal. 209 vs. \(2 (49) = 98\).
Time = 0.30 (sec) , antiderivative size = 675, normalized size of antiderivative = 11.84 \[ \int \frac {\text {csch}^2(c+d x)}{a+b \sinh ^2(c+d x)} \, dx=\left [\frac {{\left (b \cosh \left (d x + c\right )^{2} + 2 \, b \cosh \left (d x + c\right ) \sinh \left (d x + c\right ) + b \sinh \left (d x + c\right )^{2} - b\right )} \sqrt {a^{2} - a b} \log \left (\frac {b^{2} \cosh \left (d x + c\right )^{4} + 4 \, b^{2} \cosh \left (d x + c\right ) \sinh \left (d x + c\right )^{3} + b^{2} \sinh \left (d x + c\right )^{4} + 2 \, {\left (2 \, a b - b^{2}\right )} \cosh \left (d x + c\right )^{2} + 2 \, {\left (3 \, b^{2} \cosh \left (d x + c\right )^{2} + 2 \, a b - b^{2}\right )} \sinh \left (d x + c\right )^{2} + 8 \, a^{2} - 8 \, a b + b^{2} + 4 \, {\left (b^{2} \cosh \left (d x + c\right )^{3} + {\left (2 \, a b - b^{2}\right )} \cosh \left (d x + c\right )\right )} \sinh \left (d x + c\right ) + 4 \, {\left (b \cosh \left (d x + c\right )^{2} + 2 \, b \cosh \left (d x + c\right ) \sinh \left (d x + c\right ) + b \sinh \left (d x + c\right )^{2} + 2 \, a - b\right )} \sqrt {a^{2} - a b}}{b \cosh \left (d x + c\right )^{4} + 4 \, b \cosh \left (d x + c\right ) \sinh \left (d x + c\right )^{3} + b \sinh \left (d x + c\right )^{4} + 2 \, {\left (2 \, a - b\right )} \cosh \left (d x + c\right )^{2} + 2 \, {\left (3 \, b \cosh \left (d x + c\right )^{2} + 2 \, a - b\right )} \sinh \left (d x + c\right )^{2} + 4 \, {\left (b \cosh \left (d x + c\right )^{3} + {\left (2 \, a - b\right )} \cosh \left (d x + c\right )\right )} \sinh \left (d x + c\right ) + b}\right ) - 4 \, a^{2} + 4 \, a b}{2 \, {\left ({\left (a^{3} - a^{2} b\right )} d \cosh \left (d x + c\right )^{2} + 2 \, {\left (a^{3} - a^{2} b\right )} d \cosh \left (d x + c\right ) \sinh \left (d x + c\right ) + {\left (a^{3} - a^{2} b\right )} d \sinh \left (d x + c\right )^{2} - {\left (a^{3} - a^{2} b\right )} d\right )}}, \frac {{\left (b \cosh \left (d x + c\right )^{2} + 2 \, b \cosh \left (d x + c\right ) \sinh \left (d x + c\right ) + b \sinh \left (d x + c\right )^{2} - b\right )} \sqrt {-a^{2} + a b} \arctan \left (-\frac {{\left (b \cosh \left (d x + c\right )^{2} + 2 \, b \cosh \left (d x + c\right ) \sinh \left (d x + c\right ) + b \sinh \left (d x + c\right )^{2} + 2 \, a - b\right )} \sqrt {-a^{2} + a b}}{2 \, {\left (a^{2} - a b\right )}}\right ) - 2 \, a^{2} + 2 \, a b}{{\left (a^{3} - a^{2} b\right )} d \cosh \left (d x + c\right )^{2} + 2 \, {\left (a^{3} - a^{2} b\right )} d \cosh \left (d x + c\right ) \sinh \left (d x + c\right ) + {\left (a^{3} - a^{2} b\right )} d \sinh \left (d x + c\right )^{2} - {\left (a^{3} - a^{2} b\right )} d}\right ] \]
[1/2*((b*cosh(d*x + c)^2 + 2*b*cosh(d*x + c)*sinh(d*x + c) + b*sinh(d*x + c)^2 - b)*sqrt(a^2 - a*b)*log((b^2*cosh(d*x + c)^4 + 4*b^2*cosh(d*x + c)*s inh(d*x + c)^3 + b^2*sinh(d*x + c)^4 + 2*(2*a*b - b^2)*cosh(d*x + c)^2 + 2 *(3*b^2*cosh(d*x + c)^2 + 2*a*b - b^2)*sinh(d*x + c)^2 + 8*a^2 - 8*a*b + b ^2 + 4*(b^2*cosh(d*x + c)^3 + (2*a*b - b^2)*cosh(d*x + c))*sinh(d*x + c) + 4*(b*cosh(d*x + c)^2 + 2*b*cosh(d*x + c)*sinh(d*x + c) + b*sinh(d*x + c)^ 2 + 2*a - b)*sqrt(a^2 - a*b))/(b*cosh(d*x + c)^4 + 4*b*cosh(d*x + c)*sinh( d*x + c)^3 + b*sinh(d*x + c)^4 + 2*(2*a - b)*cosh(d*x + c)^2 + 2*(3*b*cosh (d*x + c)^2 + 2*a - b)*sinh(d*x + c)^2 + 4*(b*cosh(d*x + c)^3 + (2*a - b)* cosh(d*x + c))*sinh(d*x + c) + b)) - 4*a^2 + 4*a*b)/((a^3 - a^2*b)*d*cosh( d*x + c)^2 + 2*(a^3 - a^2*b)*d*cosh(d*x + c)*sinh(d*x + c) + (a^3 - a^2*b) *d*sinh(d*x + c)^2 - (a^3 - a^2*b)*d), ((b*cosh(d*x + c)^2 + 2*b*cosh(d*x + c)*sinh(d*x + c) + b*sinh(d*x + c)^2 - b)*sqrt(-a^2 + a*b)*arctan(-1/2*( b*cosh(d*x + c)^2 + 2*b*cosh(d*x + c)*sinh(d*x + c) + b*sinh(d*x + c)^2 + 2*a - b)*sqrt(-a^2 + a*b)/(a^2 - a*b)) - 2*a^2 + 2*a*b)/((a^3 - a^2*b)*d*c osh(d*x + c)^2 + 2*(a^3 - a^2*b)*d*cosh(d*x + c)*sinh(d*x + c) + (a^3 - a^ 2*b)*d*sinh(d*x + c)^2 - (a^3 - a^2*b)*d)]
\[ \int \frac {\text {csch}^2(c+d x)}{a+b \sinh ^2(c+d x)} \, dx=\int \frac {\operatorname {csch}^{2}{\left (c + d x \right )}}{a + b \sinh ^{2}{\left (c + d x \right )}}\, dx \]
Exception generated. \[ \int \frac {\text {csch}^2(c+d x)}{a+b \sinh ^2(c+d x)} \, dx=\text {Exception raised: ValueError} \]
Exception raised: ValueError >> Computation failed since Maxima requested additional constraints; using the 'assume' command before evaluation *may* help (example of legal syntax is 'assume(b-a>0)', see `assume?` for more details)Is
\[ \int \frac {\text {csch}^2(c+d x)}{a+b \sinh ^2(c+d x)} \, dx=\int { \frac {\operatorname {csch}\left (d x + c\right )^{2}}{b \sinh \left (d x + c\right )^{2} + a} \,d x } \]
Time = 1.76 (sec) , antiderivative size = 176, normalized size of antiderivative = 3.09 \[ \int \frac {\text {csch}^2(c+d x)}{a+b \sinh ^2(c+d x)} \, dx=\frac {b\,\ln \left (\frac {4\,{\mathrm {e}}^{2\,c+2\,d\,x}}{a}-\frac {2\,\left (b\,d+2\,a\,d\,{\mathrm {e}}^{2\,c+2\,d\,x}-b\,d\,{\mathrm {e}}^{2\,c+2\,d\,x}\right )}{a^{3/2}\,d\,\sqrt {a-b}}\right )}{2\,a^{3/2}\,d\,\sqrt {a-b}}-\frac {2}{a\,d\,\left ({\mathrm {e}}^{2\,c+2\,d\,x}-1\right )}-\frac {b\,\ln \left (\frac {4\,{\mathrm {e}}^{2\,c+2\,d\,x}}{a}+\frac {2\,\left (b\,d+2\,a\,d\,{\mathrm {e}}^{2\,c+2\,d\,x}-b\,d\,{\mathrm {e}}^{2\,c+2\,d\,x}\right )}{a^{3/2}\,d\,\sqrt {a-b}}\right )}{2\,a^{3/2}\,d\,\sqrt {a-b}} \]
(b*log((4*exp(2*c + 2*d*x))/a - (2*(b*d + 2*a*d*exp(2*c + 2*d*x) - b*d*exp (2*c + 2*d*x)))/(a^(3/2)*d*(a - b)^(1/2))))/(2*a^(3/2)*d*(a - b)^(1/2)) - 2/(a*d*(exp(2*c + 2*d*x) - 1)) - (b*log((4*exp(2*c + 2*d*x))/a + (2*(b*d + 2*a*d*exp(2*c + 2*d*x) - b*d*exp(2*c + 2*d*x)))/(a^(3/2)*d*(a - b)^(1/2)) ))/(2*a^(3/2)*d*(a - b)^(1/2))